package com.example.management;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.addOrUpdate,R.id.delete,R.id.list_page,R.id.list_page_like})
    public void onViewsClicked(View view) {
        switch (view.getId()) {
            case R.id.addOrUpdate:
                ContextCompat.startActivity(MainActivity.this,new Intent(MainActivity.this,AddOrUpdateActivity.class),null);
                break;
            case R.id.delete:
                ContextCompat.startActivity(MainActivity.this,new Intent(MainActivity.this,DeleteActivity.class),null);
                break;
            case R.id.list_page:
                ContextCompat.startActivity(MainActivity.this,new Intent(MainActivity.this,ListPageActivity.class),null);
                break;
            case R.id.list_page_like:
                ContextCompat.startActivity(MainActivity.this,new Intent(MainActivity.this,ListPageLikeActivity.class),null);
                break;
            default:
                break;
        }
    }
}
